\(\int \frac {(d+e x^2)^2 (a+b \log (c x^n))}{x^2} \, dx\) [192]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 83 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {b d^2 n}{x}-2 b d e n x-\frac {1}{9} b e^2 n x^3-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{x}+2 d e x \left (a+b \log \left (c x^n\right )\right )+\frac {1}{3} e^2 x^3 \left (a+b \log \left (c x^n\right )\right ) \]

[Out]

-b*d^2*n/x-2*b*d*e*n*x-1/9*b*e^2*n*x^3-d^2*(a+b*ln(c*x^n))/x+2*d*e*x*(a+b*ln(c*x^n))+1/3*e^2*x^3*(a+b*ln(c*x^n
))

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {276, 2372} \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{x}+2 d e x \left (a+b \log \left (c x^n\right )\right )+\frac {1}{3} e^2 x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {b d^2 n}{x}-2 b d e n x-\frac {1}{9} b e^2 n x^3 \]

[In]

Int[((d + e*x^2)^2*(a + b*Log[c*x^n]))/x^2,x]

[Out]

-((b*d^2*n)/x) - 2*b*d*e*n*x - (b*e^2*n*x^3)/9 - (d^2*(a + b*Log[c*x^n]))/x + 2*d*e*x*(a + b*Log[c*x^n]) + (e^
2*x^3*(a + b*Log[c*x^n]))/3

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps \begin{align*} \text {integral}& = -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{x}+2 d e x \left (a+b \log \left (c x^n\right )\right )+\frac {1}{3} e^2 x^3 \left (a+b \log \left (c x^n\right )\right )-(b n) \int \left (2 d e-\frac {d^2}{x^2}+\frac {e^2 x^2}{3}\right ) \, dx \\ & = -\frac {b d^2 n}{x}-2 b d e n x-\frac {1}{9} b e^2 n x^3-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{x}+2 d e x \left (a+b \log \left (c x^n\right )\right )+\frac {1}{3} e^2 x^3 \left (a+b \log \left (c x^n\right )\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.04 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {b d^2 n}{x}+2 a d e x-2 b d e n x-\frac {1}{9} b e^2 n x^3+2 b d e x \log \left (c x^n\right )-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{x}+\frac {1}{3} e^2 x^3 \left (a+b \log \left (c x^n\right )\right ) \]

[In]

Integrate[((d + e*x^2)^2*(a + b*Log[c*x^n]))/x^2,x]

[Out]

-((b*d^2*n)/x) + 2*a*d*e*x - 2*b*d*e*n*x - (b*e^2*n*x^3)/9 + 2*b*d*e*x*Log[c*x^n] - (d^2*(a + b*Log[c*x^n]))/x
 + (e^2*x^3*(a + b*Log[c*x^n]))/3

Maple [A] (verified)

Time = 0.78 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.16

method result size
parallelrisch \(-\frac {-3 x^{4} b \ln \left (c \,x^{n}\right ) e^{2}+b \,e^{2} n \,x^{4}-3 x^{4} a \,e^{2}-18 b \ln \left (c \,x^{n}\right ) d e \,x^{2}+18 b d e n \,x^{2}-18 a d e \,x^{2}+9 b \ln \left (c \,x^{n}\right ) d^{2}+9 b \,d^{2} n +9 a \,d^{2}}{9 x}\) \(96\)
risch \(-\frac {b \left (-e^{2} x^{4}-6 d e \,x^{2}+3 d^{2}\right ) \ln \left (x^{n}\right )}{3 x}-\frac {-18 i \pi b d e \,x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-9 i \pi b \,d^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+9 i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-18 i \pi b d e \,x^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+9 i \pi b \,d^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-9 i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+3 i \pi b \,e^{2} x^{4} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+3 i \pi b \,e^{2} x^{4} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )-6 \ln \left (c \right ) b \,e^{2} x^{4}-3 i \pi b \,e^{2} x^{4} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+18 i \pi b d e \,x^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+18 i \pi b d e \,x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )-3 i \pi b \,e^{2} x^{4} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+2 b \,e^{2} n \,x^{4}-6 x^{4} a \,e^{2}-36 e \ln \left (c \right ) b d \,x^{2}+36 b d e n \,x^{2}-36 a d e \,x^{2}+18 d^{2} b \ln \left (c \right )+18 b \,d^{2} n +18 a \,d^{2}}{18 x}\) \(419\)

[In]

int((e*x^2+d)^2*(a+b*ln(c*x^n))/x^2,x,method=_RETURNVERBOSE)

[Out]

-1/9/x*(-3*x^4*b*ln(c*x^n)*e^2+b*e^2*n*x^4-3*x^4*a*e^2-18*b*ln(c*x^n)*d*e*x^2+18*b*d*e*n*x^2-18*a*d*e*x^2+9*b*
ln(c*x^n)*d^2+9*b*d^2*n+9*a*d^2)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.31 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {{\left (b e^{2} n - 3 \, a e^{2}\right )} x^{4} + 9 \, b d^{2} n + 9 \, a d^{2} + 18 \, {\left (b d e n - a d e\right )} x^{2} - 3 \, {\left (b e^{2} x^{4} + 6 \, b d e x^{2} - 3 \, b d^{2}\right )} \log \left (c\right ) - 3 \, {\left (b e^{2} n x^{4} + 6 \, b d e n x^{2} - 3 \, b d^{2} n\right )} \log \left (x\right )}{9 \, x} \]

[In]

integrate((e*x^2+d)^2*(a+b*log(c*x^n))/x^2,x, algorithm="fricas")

[Out]

-1/9*((b*e^2*n - 3*a*e^2)*x^4 + 9*b*d^2*n + 9*a*d^2 + 18*(b*d*e*n - a*d*e)*x^2 - 3*(b*e^2*x^4 + 6*b*d*e*x^2 -
3*b*d^2)*log(c) - 3*(b*e^2*n*x^4 + 6*b*d*e*n*x^2 - 3*b*d^2*n)*log(x))/x

Sympy [A] (verification not implemented)

Time = 0.34 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.20 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=- \frac {a d^{2}}{x} + 2 a d e x + \frac {a e^{2} x^{3}}{3} - \frac {b d^{2} n}{x} - \frac {b d^{2} \log {\left (c x^{n} \right )}}{x} - 2 b d e n x + 2 b d e x \log {\left (c x^{n} \right )} - \frac {b e^{2} n x^{3}}{9} + \frac {b e^{2} x^{3} \log {\left (c x^{n} \right )}}{3} \]

[In]

integrate((e*x**2+d)**2*(a+b*ln(c*x**n))/x**2,x)

[Out]

-a*d**2/x + 2*a*d*e*x + a*e**2*x**3/3 - b*d**2*n/x - b*d**2*log(c*x**n)/x - 2*b*d*e*n*x + 2*b*d*e*x*log(c*x**n
) - b*e**2*n*x**3/9 + b*e**2*x**3*log(c*x**n)/3

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.13 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {1}{9} \, b e^{2} n x^{3} + \frac {1}{3} \, b e^{2} x^{3} \log \left (c x^{n}\right ) + \frac {1}{3} \, a e^{2} x^{3} - 2 \, b d e n x + 2 \, b d e x \log \left (c x^{n}\right ) + 2 \, a d e x - \frac {b d^{2} n}{x} - \frac {b d^{2} \log \left (c x^{n}\right )}{x} - \frac {a d^{2}}{x} \]

[In]

integrate((e*x^2+d)^2*(a+b*log(c*x^n))/x^2,x, algorithm="maxima")

[Out]

-1/9*b*e^2*n*x^3 + 1/3*b*e^2*x^3*log(c*x^n) + 1/3*a*e^2*x^3 - 2*b*d*e*n*x + 2*b*d*e*x*log(c*x^n) + 2*a*d*e*x -
 b*d^2*n/x - b*d^2*log(c*x^n)/x - a*d^2/x

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.24 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=-\frac {1}{9} \, {\left (b e^{2} n - 3 \, b e^{2} \log \left (c\right ) - 3 \, a e^{2}\right )} x^{3} - 2 \, {\left (b d e n - b d e \log \left (c\right ) - a d e\right )} x + \frac {1}{3} \, {\left (b e^{2} n x^{3} + 6 \, b d e n x - \frac {3 \, b d^{2} n}{x}\right )} \log \left (x\right ) - \frac {b d^{2} n + b d^{2} \log \left (c\right ) + a d^{2}}{x} \]

[In]

integrate((e*x^2+d)^2*(a+b*log(c*x^n))/x^2,x, algorithm="giac")

[Out]

-1/9*(b*e^2*n - 3*b*e^2*log(c) - 3*a*e^2)*x^3 - 2*(b*d*e*n - b*d*e*log(c) - a*d*e)*x + 1/3*(b*e^2*n*x^3 + 6*b*
d*e*n*x - 3*b*d^2*n/x)*log(x) - (b*d^2*n + b*d^2*log(c) + a*d^2)/x

Mupad [B] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.23 \[ \int \frac {\left (d+e x^2\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx=\ln \left (c\,x^n\right )\,\left (\frac {\frac {4\,b\,e^2\,x^4}{3}+4\,b\,d\,e\,x^2}{x}-\frac {b\,d^2+2\,b\,d\,e\,x^2+b\,e^2\,x^4}{x}\right )-\frac {a\,d^2+b\,d^2\,n}{x}+\frac {e^2\,x^3\,\left (3\,a-b\,n\right )}{9}+2\,d\,e\,x\,\left (a-b\,n\right ) \]

[In]

int(((d + e*x^2)^2*(a + b*log(c*x^n)))/x^2,x)

[Out]

log(c*x^n)*(((4*b*e^2*x^4)/3 + 4*b*d*e*x^2)/x - (b*d^2 + b*e^2*x^4 + 2*b*d*e*x^2)/x) - (a*d^2 + b*d^2*n)/x + (
e^2*x^3*(3*a - b*n))/9 + 2*d*e*x*(a - b*n)